<?php

include_once"mp3.class.php";

//implementation array indices
$mesMp3[] = new Mp3("Y'a dla joie", "Charles Trenet", 3.09);
$mesMp3[] = new Mp3("La pluie", "Claude Nougaro", 3.54);
$mesMp3[] = new Mp3("Gaton y'a le telefon qui son", "Nino ferrer", 2.37);

usort($mesMp3, array("Mp3", "compareToTitre"));

foreach ($mesMp3 as $unMp3){
    echo $unMp3 . "\n";
}

usort($mesMp3, array("Mp3", "compareToArtiste"));

foreach ($mesMp3 as $unMp3){
    echo $unMp3 . "\n";
}

usort($mesMp3, array("Mp3", "compareToDuree"));

foreach ($mesMp3 as $unMp3){
    echo $unMp3 . "\n";
}
?>
